# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor: javier dot tia at gmail dot com

pkgname=ttf-input
pkgver=20220502
pkgrel=2
pkgdesc='Fonts for code from DJR & Font Bureau'
arch=('any')
url='https://input.djr.com/'
license=('custom')
_url="${url}build/?fontSelection=whole&a=0&g=0&i=0&l=0&zero=0&asterisk=0&braces=0&preset=default&line-height=1.2&accept=I+do&email="
# the content at $_url is dynamically generated every request, use a snapshot
source=("https://sources.archlinux.org/other/community/ttf-input/Input_Fonts_${pkgver}.zip")
sha256sums=('bc314ea9026fba5134cd2a7ba93a4ec48607f341d32e4eb3dfae20d141cb91b3')

package() {
  mkdir -p ${pkgdir}/usr/share/fonts/TTF
  find ${srcdir}/Input_Fonts -name '*.ttf' \
    -exec cp {} ${pkgdir}/usr/share/fonts/TTF \;
  chmod 644 ${pkgdir}/usr/share/fonts/TTF/*

  mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
  cp ${srcdir}/LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}
}
